import { AIHandlers } from "../Entity/AAIHandler";
import { AIDispatcherCom } from "../Entity/AIDipatcherCom";
@et.objectSystem(AIDispatcherCom)
class AIDispathcherComAwakeSystem extends et.AwakeSystem<AIDispatcherCom>{
    awake(self: AIDispatcherCom): void {
        AIDispatcherHelper.Load(self);
    }
}
class AIDispatcherHelper {
    public static Load(self: AIDispatcherCom) {
        
        self.AIHandlerMap.clear();

        var types = AIHandlers;
        for (let type of types) {
            let aaiHandler = new type.ctor();
            self.AIHandlerMap.set(type.id, aaiHandler);
        }
    }
}